
<td class="calendar_cell half_1st day_{{ day.val }}
    {{#if day.is_bank_holiday}}bank_holiday_cell{{/if}}
    {{#if day.is_weekend}}weekend_cell{{/if}}
    {{#if day.is_leave_morning }}
        {{#if day.is_new_leave}}
            leave_cell_pended
        {{else}}
            leave_cell
            {{day.leave_color_class_morning}}
        {{/if}}
    {{/if}}
    {{# if day.is_current_day }}current_day_cell{{/if}}
">
<span
  {{#unless day.is_bank_holiday}}
    {{#unless day.is_weekend}}
      {{# with  day.leave_obj }}
        {{#if this }}
          class="leave-details-summary-trigger"
          data-leave-id="{{this.id}}"

          data-toggle="tooltip"
          data-placement="top"
          title="
            {{~#if ../day.leaveLabel ~}}{{~../day.leaveLabel~}}: {{/if~}}
            {{~#if ../../day.is_current_day}}Today{{/if~}}
            {{~#if this.is_new_leave}}New absence waiting approval{{/if~}}
            {{~#if this.is_pended_revoke_leave}}Revoked waiting for approval{{/if~}}
            {{~#if this.is_approved_leave~}}
              {{~#unless this.is_pended_revoke_leave}}Approved absence{{/unless~}}
            {{~/if}}"
        {{/if}}
      {{/with}}
    {{/unless}}
  {{/unless}}

  {{#if day.is_current_day}}
    data-toggle="tooltip"
    data-placement="top"
    title="Today"
  {{/if}}

  {{#if day.is_bank_holiday}}
    data-toggle="tooltip"
    data-placement="top"
    title="Bank holiday: {{day.bank_holiday_name}}"
  {{/if}}

>{{day.val}}</span>
</td>
<td class="calendar_cell half_2nd day_{{ day.val }}
    {{#if day.is_bank_holiday}}bank_holiday_cell{{/if}}
    {{#if day.is_weekend}}weekend_cell{{/if}}
    {{#if day.is_leave_afternoon }}
        {{#if day.is_new_leave}}
            leave_cell_pended
        {{else}}
            leave_cell
            {{day.leave_color_class_afternoon}}
        {{/if}}
    {{/if}}
    {{# if day.is_current_day }}current_day_cell{{/if}}
"></td>
